from func_timeout import func_timeout, FunctionTimedOut
import datetime
from board import Board
from copy import deepcopy
import random


class RandomPlayer(object):
    def __init__(self, color):
        self.color = color

    def get_move(self, board):
        legal_actions = list(board.get_legal_actions(self.color))
        if legal_actions is not None:
            return legal_actions[random.randint(0, len(legal_actions) - 1)]
        else:
            return None
